import { HttpStatusCode, Method, RawAxiosResponseHeaders } from 'axios'

export type headerKey = 'Content-Type' | 'Authorization'

export type headerValue =
  | 'application/json'
  | 'application/x-www-form-urlencoded'
  | 'multipart/form-data'

export type IHeaders = RawAxiosResponseHeaders & {
  [key in headerKey]?: headerValue
}

export interface IResonseData<T> {
  code: `${HttpStatusCode}`
  data: T
  message: string
}

export interface IRequestData {
  url: string
  method?: Method
  headers?: IHeaders
  data?: unknown
  params?: unknown
}
